#include "Goblin.h"
#include "../Map/Zone.h"
#include "../../Render/TextureManager.h"
#include "../Map/ZoneManager.h"

Goblin::Goblin()
{
	DWORD key = ColorToKey(0xFF,0xFF,0xFF);
	int imgID = TextureManager::GetInstance()->LoadTeture("../Resource/Knight.png", key);
	SetImageID(imgID);
}


Goblin::~Goblin(void)
{
}

void Goblin::Update(float deltaTime)
{
	
}

void Goblin::Render(void)
{
	int midX = (m_ImageWidth/2);
	int midY = (m_ImageHeight/2);

	if(m_Health > 0)
		m_Camera->Draw(m_ImageID, ((int)m_BasePositionX)-midX, ((int)m_BasePositionY)-midY, 1.0f, 1.0f, NULL, (float)midX, (float)midY, 0.0, ColorToKey(20, 151, 16));
	else
		m_Camera->Draw(m_ImageID, ((int)m_BasePositionX)-midX, ((int)m_BasePositionY)-midY, 1.0f, 1.0f, NULL, (float)midX, (float)midY, 0.0, ColorToKey(10, 0,0));
}
